package com.zgm.dao.impl;

import javax.annotation.Resource;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.springframework.stereotype.Repository;

import com.zgm.dao.MemberDao;
import com.zgm.entity.Member;

@Repository
public class MemberDaoImpl extends BaseDaoImpl<Member, String> implements MemberDao  {

//	@Resource
//	private SessionFactory sessionFactory;
	
	
	/*public void save(Member member) {
		Session session = this.getSession();
//		Transaction transaction = session.beginTransaction();
		Transaction transaction = session.getTransaction();
		transaction.begin();
		session.save( member );
//		session.getTransaction().commit();
		transaction.commit();
		
	}
	
	public void save2(Member member) {
		this.getSession2().save( member );
		
	}*/
	
//	public Session getSession() {
//		return this.sessionFactory.openSession();
//	}
//
//	private Session getSession2() {
//		return this.sessionFactory.getCurrentSession();
//	}

}
